<?php

/**
 * branch actions.
 *
 * @package    Nika
 * @subpackage branch
 * @author     Alexey Shapran (alexey.shapran@gmail.com)
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class branchActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    $this->allbranches = Branch::retrieveallbranches();
    $this->cbranch = $this->getRequestParameter('cbranch');    
    if ($this->cbranch!=NULL)
    {    
    $this->currbranch = Branch::retrievebranchbyid($this->cbranch);    
    $this->events = Event::retrievebranchevents($this->cbranch);
    }
  }
}
